<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*显示/隐藏的过度效果*/
        .slide-fade-enter-active, .slide-fade-leave-active{
            transition: opacity 1s;
        }
        /*隐藏时的样式*/
        .slide-fade-enter,.slide-fade-leave-to{
            opacity: 0;
        }

        /*显示/隐藏的过度效果*/
        .move-enter-active{
            transition: all 1s
        }

        .move-leave-active{
            transition: all 3s
        }

        /*隐藏时的样式*/
        .move-enter,.move-leave-to{
            opacity: 0;
            transform: translateX(20px);
        }
    </style>
</head>
<body>
<div id="test1">
    <button @click="isShow=!isShow">toggle1</button>
    <transition name="slide-fade">
        <p v-show="isShow">hello</p><br>
    </transition>
</div>



<div id="test2">
    <button @click="isShow=!isShow">toggle2</button>
    <transition name="move">
        <p v-show="isShow">hello</p><br>
    </transition>
</div>


<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript">
    new Vue({
        el:'#test1',
        data(){
            return{
                isShow:true
            }
        }
    })

    new Vue({
        el:'#test2',
        data(){
            return{
                isShow:true
            }
        }
    })
</script>
</body>
</html>